    function uploadInfo() {
        $.getJSON("<c:url value='/common/uploadInfo.do'/>",
	        function(data) {
	            $.each(data.uploadInfo, function(i, info) {
	                if(info.status == "progress") {
	                	$("#saveBtn").attr("disabled", "true");
	                	$("#file0").attr("disabled", "true");

//	                    var fileIndex = info.fileIndex;
	                    var progressPercent = Math.ceil((info.bytesRead / info.totalSize) * 100);

	                    $("#progressBarText").attr("innerHTML", "upload in progress: " + progressPercent + "%, transfered " + info.bytesRead + " of " + info.totalSize + " bytes");
	                    
	                    widthMultiplier = document.getElementById('progressBarBox').clientWidth / 100;
	                    $("#progressBarBoxContent").width(parseInt(progressPercent * widthMultiplier));
	                    
	                    if(info.totalSize > info.bytesRead)
	                    	window.setTimeout("uploadInfo()", 500);
	                } else {
	                    var progressPercent = Math.ceil((info.bytesRead / info.totalSize) * 100);

	                    $("#progressBarText").attr("innerHTML", "upload in progress: " + progressPercent + "%, transfered " + info.bytesRead + " of " + info.totalSize + " bytes");
	                    
	                    widthMultiplier = document.getElementById('progressBarBox').clientWidth / 100;
	                    $("#progressBarBoxContent").width(parseInt(progressPercent * widthMultiplier));
	                    
	                	$("#saveBtn").attr("disabled", "false");
	                	$("#file0").attr("disabled", "false");
	                }
	            });
	        });
    }
    
    function progress() {
    	$("#progressBar").css({ "display" : "block" });
    	$("#progressBarBoxContent").width("0");
        $("#progressBarText").attr("innerHTML", "upload in progress: 0%");
        $("#saveBtn").attr("disabled", "true");
    	window.setTimeout("uploadInfo()", 1000);
    }
    
    function formSubmit(form, command, action, content, showProgress) {
        if(command) $("#command").attr("value", command);
        if(action) $("#" + form).attr("action", action);

        if(content) $("#" + content).val(SAGAEditor.getConetent());
        
//        alert(edit.getConetent());
//        alert($("#content").val());
        
        if(form) $("#" + form).submit();
        if(showProgress) progress();
    }
    
    function editFormSubmit(form, content, showProgress) {
    	//if(command) $("#command").attr("value", command);

    	$("#" + content).val(SAGAEditor.getConetent());
    	
    	if(form) $("#" + form).submit();
    	if(showProgress) progress();
    }
    
    function bbsAdminSubmit(form, command) {
    	if(command) $("#command").attr("value", command);
    	if(form) $("#" + form).submit();
    }